package com.ling.pl.security.utils;

/**
 * @author bo.wang
 */
public class SecurityConfigAttribute implements ConfigAttribute {
    private static final long serialVersionUID = 6738019563942071383L;
    AuthenticatedVoter voter;
    private boolean granted;
    private Object member;
    private String companyId;
    private String attribute;
    private AttributeType attributeType;

    public SecurityConfigAttribute(AuthenticatedVoter voter) {
        this.voter = voter;
    }

    public SecurityConfigAttribute(AttributeType attributeType, boolean granted, String companyId) {
        this.companyId = companyId;
        this.granted = granted;
        this.attributeType = attributeType;
    }

    public String getAttribute() {
        return attribute;
    }

    public void setAttribute(String attribute) {
        this.attribute = attribute;
    }

    public boolean isGranted() {
        return granted;
    }

    public Object getMember() {
        return member;
    }

    public void setMember(Object member) {
        this.member = member;
    }

    public String getCompanyId() {
        return companyId;
    }

    public AttributeType getAttributeType() {
        return attributeType;
    }
}
